import { commonTableOptions } from "@/utils/options"

export function tableOption () {
  const self = this
  return {
    ...commonTableOptions,
    // height: self?.documentHeight - 420,
    header: true,
    menuWidth: 250,
    indexFixed: false,
    menuFixed: false,
    labelWidth: 100,
    labelPosition: "right",
    column: [
      {
        label: "角色名称",
        prop: "roleName",
        span: 24,
        hide: false,
        maxlength: 50,
        rules: [
          { required: true, message: "角色不能为空", trigger: "blur" },
        ],
        search: true,
        headerslot: true,
        overHidden: true,
      },
      {
        label: "角色描述",
        prop: "roleDesc",
        hide: false,
        span: 24,
        search: false,
        overHidden: true,
        maxlength: 200,
        type: "textarea",
      },
      {
        label: "成员人数",
        search: false,
        prop: "userNum",
        hide: false,
        overHidden: true,
        type: "input",
        rules: [{ max: 128, message: "长度在 128 个字符内", trigger: "blur" }],
        addDisplay: false,
        editDisplay: false,
      },
      {
        label: "状态",
        prop: "status",
        hide: false,
        rules: [
          { required: true, message: "按钮分组不能为空", trigger: "change" },
        ],
        search: true,
        type: "select",
        dicData: [
          {
            label: '启用',
            value: '1'
          }, {
            label: '停用',
            value: '0'
          }
        ],
        addDisplay: false,
        editDisplay: false,
      },
      {
        label: "创建时间",
        prop: "createTime",
        hide: false,
        type: "datetime",
        format: "yyyy-MM-dd HH:mm:ss",
        valueFormat: "yyyy-MM-dd HH:mm:ss",
        editDisplay: false,
        addDisplay: false,
        width: 200,
      },
    ],
  }
}
